feat(plugins): Support bootstrap configuration#1079
Conversation
|
Thanks for submitting this pull request, @sanderob. |
Hi @LeoColomb! I believe your suggestion to move the configuration loading ( extra_config_base = Path("/run/config/extra")
config_files = [Path("/run/config/netbox/netbox.yaml")]
config_files.extend(sorted(extra_config_base.glob("*/*.yaml")))However, the necessary configuration is native python code, for example the following: from netbox_branching.utilities import DynamicSchemaDict
DATABASES = DynamicSchemaDict(DATABASES)
DATABASE_ROUTERS = ['netbox_branching.database.BranchAwareRouter']I am open to solve this without adding any additional keys. Are you aware of any methods for including (and executing) python code as any form of additional config? |
|
@LeoColomb I am adding a small reminder here :) |
This PR solves the need for Python configuration that is executed before plugins are imported. The configuration is appended to
configuration.py, through the keyextraBootstrapConfig. This PR is created in relevance to an existing issue.Fixes #1043